﻿using System;
using System.Text.RegularExpressions;

namespace ReplaceHyperlinks
{
    public class Program
    {
        public static void Main()
        {
            string text = @"<a href=ww.google.com>google</a> is awesome!";
            string pattern = @"<a href=([^<>]+)>([^<>]+)</a>";
            string replacePattern = @"[url href=$1]$2[/url]";

            Regex regex = new Regex(pattern);
            while (regex.Match(text).Success)
            {
                text = regex.Replace(text, replacePattern);
            }
            Console.WriteLine(text);
        }
    }
}
